package org.hk.kg.finance.coststander.service;

import java.util.List;
import java.util.Map;

import org.hk.kg.db.DBContext;
import org.hk.kg.utils.Constants;

public class CostStanderService implements ICostStanderService {
	private static final String QRY_CSTSTDR = "select ct.clzTypeId,ct.clzTypeName,"
		+ "cot.costTypeId,cot.costTypeName,"
		+ "st.typeId,st.typeName,"
		+ "cs.stander_one,"
		+ "cs.stander_two,"
		+ "cs.stander_tree,"
		+ "cs.stander_four,"
		+ "cs.stander_five,"
		+ "cs.stander_six,"
		+ "cs.stander_seven"
		+ " from clzzType ct,cost_type cot,stu_type st"
		+ " left join cost_stander cs on (ct.clzTypeId = cs.clzTypeId $notNull(classType,and ct.clzTypeId=${classType}))"
		+ " and (cot.costTypeId = cs.costTypeId $notNull(costType,and cs.costTypeId=${costType}))"
		+ " and (st.typeId = cs.stuType)";
	@Override
	public List<Map> queryCstStdr(Map map) {
		return DBContext.instatnce.query(Constants.DB_DEFAULT, QRY_CSTSTDR,map);
	}

	@Override
	public List<Map> queryCstStdrNotSetted(Map map) {
		// TODO Auto-generated method stub
		return DBContext.instatnce.query(Constants.DB_DEFAULT, QRY_CSTSTDR,map);
	}
	
}
